FileDir = File.expand_path(File.dirname(__FILE__))
load "#{FileDir}/lib/aio.rb"
require "pp"
# require 'byebug'

DefaultInputFile = "#{FileDir}/../aio_file/test_file2"

# 实例module_manager 和 parser
module_manager = Aio::ModuleManager.new
module_loader = Aio::Module::Loader.new(module_manager)
modules_parent_path = "#{FileDir}/lib/modules"
module_loader.load_modules(modules_parent_path)

device_manager = Aio::DeviceManager.new(module_manager)
parser_machine = Aio::Parse::ParserMachine.new(device_manager)
parser = Aio::Parse::Parser.new(device_manager, parser_machine)

# 实例Aio::Ui::Console
console = Aio::Ui::Console.new(ARGV)

console.module_manager = module_manager
console.parser = parser
console.device_manager = device_manager
console.process
